import java.util.*;

public class Run {
	private static LinkedList<Item> items = new LinkedList<Item>();
	public static void main(String[] args) {
		Item[] init_arr = {
			new Item(0.2,"Tofu"),
			new Item(0.6,"Rice"),
			new Item(0.9,"Yogurt"),
			new Item(0.8,"Pancakes"),
			new Item(0.2,"Cookies"),
			new Item(0.7,"Chicken"),
			new Item(0.9,"Fish"),
			new Item(0.4,"Brocoli"),
			new Item(0.6,"Spinach"),
			new Item(1.0,"Salmon Roll"),
			new Item(0.1,"Mushroom"),
			new Item(0.5,"Tacos"),
			new Item(0.7,"Coffee"),
			new Item(0.2,"Energy Drink"),
			new Item(0.7,"Fresh Fruit")
		};
		for(Item item : init_arr) items.add(item);
		int count = 356*3;
		System.out.print("Sunday     ");
		System.out.print("Monday     ");
		System.out.print("Tuesday    ");
		System.out.print("Wednesday  ");
		System.out.print("Thursday   ");
		System.out.print("Friday     ");
		System.out.print("Saturday   ");
		System.out.print("\n-----------------------------------------------------------------------------");
		for(int i=0; i<count;i++) {
			if(i%7==0) System.out.println();
			String name = getItem().getName();
			int len = Math.min(10,name.length());
			System.out.print(name.substring(0,len));
			System.out.print("           ".substring(len));
		}

		Arrays.sort(init_arr);
		System.out.println();
		for(Item item : init_arr)
			System.out.println(item.getName()+" "+item.count+" "
				+item.getScore());
	}

	public static Item getItem() {
		ListIterator<Item> itr = items.listIterator(0);
		Item item=null;
		while(itr.hasNext()) {
			item=itr.next();
			if(Math.random()<item.getScore()*item.getScore()) break;
		}
		if(item!=null) {
			itr.remove();
			items.offer(item);
			item.count++;
		}
		return item;
	}
}
